package com.dbf.forum.controller.user;

import java.util.ArrayList;
import java.util.List;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.authentication.AuthenticationProvider;


public class MyAuthenticationProvider /*implements AuthenticationProvider*/ {

    static final List<GrantedAuthority> AUTHORITIES = new ArrayList<GrantedAuthority>();

    static {
      AUTHORITIES.add(new SimpleGrantedAuthority("ROLE_USER"));
    }

//    @Override
//    public Authentication authenticate(Authentication auth)
//            throws AuthenticationException {
//        return new UsernamePasswordAuthenticationToken(auth.getName(), auth.getCredentials(), AUTHORITIES);
//    }
//
//    @Override
//    public boolean supports(Class<? extends Object> paramClass) {
//        return true;
//    }

}
